public class WheatCropsBlock : BlockMaterial
{
    public WheatCropsBlock() : base("wheat_crops")
    {
        SetDisplayName("小麦种子");
        SetStateMax(8);
        SetCollide(false);
        SetBlockEntityCreate(() => new WheatCropsEntity());
        SetTickEvent((UpdataTickEvent e) =>
        {
            BlockData down = e.BottomBlock();
            if (down == null || down.Name != "farmland")
            {
                e.block.SetBlock(Materials.Air);
                return;
            }
            WheatCropsEntity wce = e.block.blockEntity as WheatCropsEntity;
            if (wce.pace < wce.max) wce.pace++;
            int i = wce.pace / wce.max;
            e.block.SetState(i);
        });
    }
}